import request from "@/utils/request";

export const godownEntryApi = {
  contextPath: '/equip', //按照实际应用修改成微服务的名�?//
  page: (data) => { //分页查询//
    return request({
      url: godownEntryApi.contextPath + '/t-en-wz-crk-order/page',
      method: 'POST',
      data: data
    })
  },
  update: (data) => { //更新多条数据//
    return request({
      url: godownEntryApi.contextPath + '/t-en-wz-crk-order/update',
      method: 'POST',
      data: data
    })
  },
  insert: (data) => { //新增多条数据//
    return request({
      url: godownEntryApi.contextPath + '/t-en-wz-crk-order/insert',
      method: 'POST',
      data: data
    })
  },
  delete: (data) => { //删除多条数据//
    return request({
      url: godownEntryApi.contextPath + '/t-en-wz-crk-order/deleteByIds',
      // '/t-bizc-enery-equip/delete',
      method: 'POST',
      data: data
    })
  },
  submitShByIds: (data) => { //通过主键查询多条数据//
    return request({
      url: godownEntryApi.contextPath + '/t-en-wz-crk-order/submitShByIds',
      method: 'POST',
      data: data
    })
  },
  getDjbh: (data) => { //单据编号//
    return request({
      url: godownEntryApi.contextPath + '/t-en-wz-crk-order/getDjbh',
      method: 'POST',
      data: data,
    })
  },
  queryDictData: (code) => { //字典//
    return request({
      url: godownEntryApi.contextPath + '/t-en-interface-code/queryLeaf?code=' + code,
      method: 'POST',
      // data: code
    })
  },
  getPageMessage: (data) => { //导入//
    return request({
      url: godownEntryApi.contextPath + '/t-en-wz-equip/page',
      method: 'POST',
      data: data,
    })
  },
  getDjData: (id) => { //根据id获取单据信息
    return request({
      url: godownEntryApi.contextPath + '/t-en-wz-crk-order/' + id,
      method: 'POST'
    })
  },
  getDjEquipList: (data) => { //根据id获取设备数据
    return request({
      url: godownEntryApi.contextPath + '/t-en-wz-crk-order-equip/getByDjBhPage',
      method: 'POST',
      data: data
    })
  },
  getShpage: (data) => { //审核单据列表分页查询
    return request({
      url: godownEntryApi.contextPath + '/t-en-wz-crk-order/shPage',
      method: 'POST',
      data: data
    })
  },
  updateDjsh: (data) => {
    return request({
      url: godownEntryApi.contextPath + '/t-en-wz-crk-order/shDj',
      method: 'POST',
      data: data
    })
  },
  exportXls: (data) => { //导出//
    return request({
      url: godownEntryApi.contextPath + '/t-en-wz-crk-order-equip/export/excel',
      method: 'POST',
      data: data,
      responseType: 'blob'
    })
  },
  getEquipDetailPage: (data) => {//盘点统计
    return request({
      url: godownEntryApi.contextPath + '/t-en-wz-crk-order-equip/pageGetEquipXq',
      method: 'POST',
      data: data
    })
  },
  getTaskEquipList: (data) => { //根据任务编号查询盘点
    return request({
      url: godownEntryApi.contextPath + '/t-en-stock-task/getTaskEquipListPage',
      method: 'POST',
      data: data
    })
  },
  getTaskEquipDiffList: (data) => {//根据任务编号查询设备差异列表
    return request({
      url: godownEntryApi.contextPath + '/en-wz-equip-log/getTaskEquipDiffList',
      method: 'POST',
      data: data
    })
  },
  getTaskEquipMatchList: (data) => {//根据任务编号查询设备匹配列表
    return request({
      url: godownEntryApi.contextPath + '/en-wz-equip-log/getTaskEquipMatchList',
      method: 'POST',
      data: data

    })
  },
  getTaskpage: (data) => {//根据任务编号查询库存
    return request({
      url: godownEntryApi.contextPath + '/en-wz-equip-log/page',
      method: 'POST',
      data: data

    })
  }
}
